<%@ page contentType='text/html; charset=iso-8859-1' language="java"%>
<%@ page pageEncoding="UTF-8"%>
<%@ include file="../WEB-INF/jspf/cabecalho.jspf" %>
<%@ include file="../WEB-INF/jspf/acesso.jspf" %>
<%@ include file="../WEB-INF/jspf/setMeta.jspf" %>


<sql:query var='rsetReg' dataSource='${con}'>
    
    SELECT * FROM Cliente WHERE Cliente.orgao LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Cliente.sigla LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Cliente.contato LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Cliente.telefone LIKE '%<c:out value="${param.criterio}"/>%' 
    
</sql:query>


<form name="form1" method="post" action="">
  <fieldset>
  <legend><font color="#0000FF"><strong>Resultado da Busca por "<c:out value="${param.criterio}"/>" </strong></font></legend>
  <br/>
  <table width="100%" border="1" bordercolor="#0000FF">
    <tr bgcolor="#00CCFF"> 
      <td width="6%" ><div align="center"><strong>C&oacute;digo</strong></div></td>
      <td width="40%"><div align="center"><strong>&Oacute;rg&atilde;o</strong></div></td>
      <td width="12%"><div align="center"><strong>Sigla</strong></div></td>
      <td width="10%"><div align="center"><strong>Telefone</strong></div></td>
      <td width="19%"><div align="center"><strong>Contato</strong></div></td>
      <td width="8%" ><div align="center"><strong>Status</strong></div></td>
      <td width="5%" colspan="3"><div align="center"><strong>Manuten&ccedil;&atilde;o</strong></div></td>
    </tr>
    <c:forEach var="row" items="${rsetReg.rowsByIndex}">
      <tr> 
        <td><div align="center"><c:out value="${row[0]}"/></div></td>
        <td><div align="left"><c:out value="${row[1]}"/></div></td>
        <td><div align="left"><c:out value="${row[2]}"/></div></td>
        <td><div align="left"><c:out value="${row[3]}"/></div></td>
        <td><div align="left"><c:out value="${row[4]}"/></div></td>
        <td><div align="left"><c:out value="${row[5]}"/></div></td>
        <td><div align="center"><a href="visualizarDadosDeCliente.jsp?chv1=<c:out value="${row[0]}"/>"><img src="imagens/icones/visualizar.gif" alt="Visualizar a solicita&ccedil;&atilde;o" width="16" height="16" border="0" /></a></div></td>
        <td><div align="center"><a href="editarDadosDeCliente.jsp?chv1=<c:out value="${row[0]}"/>"><img src="imagens/icones/editar.gif" width="16" height="16" border="0" /></a></div></td>
        <td><div align="center"><a href="historicoDeCliente.jsp?chv1=<c:out value="${row[0]}"/>"><img src="imagens/icones/historico.gif" width="16" height="16" border="0" /></a></div></td>
     </tr>
     </br>
     </c:forEach>
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  </fieldset>
</form>
</body>
</html>
